﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="View.aspx.cs" Inherits="Wicresoft.RDW.Calendar.View" EnableEventValidation="false" %>

<%@ Register Src="../UserControls/LocationLabControl.ascx" TagName="LocationLabControl"
    TagPrefix="uc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <link rel="stylesheet" type="text/css" href="../Content/css/fullcalendar.css" />
    <script type="text/javascript" src="../Content/js/jquery-ui-1.8.16.custom.min.js"></script>
    <script type="text/javascript" src="../Content/js/fullcalendar.min.js"></script>
    <script type="text/javascript" src="../Content/js/Calendar.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <style type="text/css">
        body #ll li
        {
            margin: 0px 0;
            width: 240px;
            float: left;
        }
       body #ll li label
        {
            margin: 3px 0;
            width: 100px;
            float: left;
            text-align:right;
        }
    </style>
    <script type='text/javascript'>

        var locationId;
        var labId;
        var yearId;
        var monthId;

        var Language = $("#<%=Language %>").selector.replace("#", "");

        $(function () {
            var time = new Date();
            calendar(1, time.getFullYear(), time.getMonth() + 1);

            //registe ajax event

            var location = $('#<%=ucLocation.FindControl("ddlLocation").ClientID %>');
            var month = $('#<%=ddlMonth.ClientID %>');
            month.change(function () { getLabAndDate(); });
            locationId = location.attr("id");
            labId = $('#<%=ucLocation.FindControl("ddlLab").ClientID %>').attr("id");
            location.change(function () {
                $("#" + labId).children("option").each(function (index) {
                    $(this).remove();
                });
            });

            yearId = $("#<%=ddlYear.ClientID %>").attr("id");
            monthId = month.attr("id");
            
        });
        
    </script>


    <div id="content" style="height: 960px;">
         <div class="agenda"><div class="agenda_bg ui-icons">
            <div class="agenda_left">                  <p>                    <asp:Label ID="labSignDesc" runat="server"/>                     <span class="ui-icons-green ui-icons"><font class="agenda_green"><asp:Label ID="labApprovedSign" runat="server"/></font></span>                     <span class="ui-icons-organ ui-icons"><font class="agenda_organ"><asp:Label ID="labCompleted" runat="server"/></font></span>                     <span class="ui-icons-gray ui-icons"><font class="agenda_gray"><asp:Label ID="labCancelled" runat="server"/></font></span>                     <span class="ui-icons-red ui-icons"><font class="agenda_red"><asp:Label ID="labClosed" runat="server"/></font></span>                  </p>                   <p><asp:Label ID="labMouseDesc" runat="server"/></p>              </div>            <div class="agenda_right"><asp:Button ID="btnApply" runat="server" OnClick="btnApply_Click"/></div> 
            <div id="calendar_head" class="agenda_date">
                <uc:LocationLabControl ID="ucLocation" EnableValidation="false" Vertical="true" IsRemovePleaseSelect="true" runat="server"/>
                <asp:Label ID="lbl_year" runat="server" />
                <asp:DropDownList ID="ddlYear" runat="server" DataValueField="Year" />
                <asp:Label ID="lbl_month" runat="server" />
                <asp:DropDownList ID="ddlMonth" runat="server" DataValueField="Month" />
            </div>
        </div>

        </div>
        <div class="clear"></div>
        <div id="calendar" style="width: 900px;padding-left:30px;">
        </div>
    </div>
</asp:Content>
